#include<iostream>

using namespace std;

inline int min(int a,int b){return a<b?a:b;}

const int F=222;

const int INF=999999999;

int a[F][F],dp[F];

int main()
{
	int n;
	cin>>n;
	for(int i=1;i<n;i++)
	{
		for(int j=i+1;j<=n;j++)
			cin>>a[i][j];
		dp[i]=INF;
	}
	for(int i=n-1;i>=1;i--)
		for(int j=i+1;j<=n;j++)
			dp[i]=min(dp[i],a[i][j]+dp[j]);
	cout<<dp[1];
	return 0;
}